package org.jeecg.modules.fund.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.fund.entity.FundLibrary;
import org.jeecg.modules.fund.entity.FundValue;

import java.util.List;
import java.util.Map;

public interface FundLibraryMapper extends BaseMapper<FundLibrary> {
    /**
     * 更新line60
     * @param list updateEstimate=1,则更新估值，否则不更新
     */
    void updateEstimateLine60(@Param("list") List<FundValue> list);

    /**
     * 获取分页
     * @param page
     * @param library
     * @return
     */
    IPage<Map<String,Object>> selectPageVo(IPage<FundLibrary> page, @Param("library") FundLibrary library);

    /**
     * 加仓区
     * @param page
     * @param library
     * @return
     */
    IPage<Map<String,Object>> selectAddPageVo(IPage<FundLibrary> page, @Param("library") FundLibrary library);

    /**
     * 获取持有净值列表
     * @param tableName
     * @param fundId
     * @param startDate
     * @param endDate
     * @return
     */
    List<Map<String,Object>> findValueList(@Param("tableName") String tableName, @Param("fundId") String fundId, @Param("startDate") String startDate, @Param("endDate") String endDate);

}
